package com.itheima.IO流.写输出Output.向文本写换行;

import java.io.FileOutputStream;
import java.io.IOException;

public class OutputDemo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("D:\\IdeaProjects\\JavaSE_Code\\day622_File&IO流\\a.txt");
        fos.write("  静夜思\r\n".getBytes());
        fos.write("窗前明月光，".getBytes());
        fos.write(System.lineSeparator().getBytes());
          //输出一个换行符，任意系统通用
        fos.write("疑是地上霜。".getBytes());
        fos.write(System.lineSeparator().getBytes());
        fos.write("举头望明月，".getBytes());
        fos.write(System.lineSeparator().getBytes());
        fos.write("低头思故乡。".getBytes());

            fos.close();
    }
}
